<?php
session_start();
require('sqlconnect.php');
if (isset($_GET['logout'])) {
    session_destroy();
    setcookie("user", "", time() - 3600);
    header("Location:HomePage.php");
}
?>
<!DOCTYPE html>
<html>
    <head>       
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Welcome Froshies!</title>
        <link rel="stylesheet" href="style.css" type="text/css" media="all" />
        <script src="jquery-1.7.2.min.js" type="text/javascript"></script>
        <script type ="text/javascript"src="Galleryjs.js"></script>
        <script type="text/javascript" src="script.js"></script>
        <script type ="text/javascript" src="menujs.js"></script>


        <script type="text/javascript" src="formValidation.js"></script>
    </head>
    <body onload="galleryrun()">

        <div id="fb-root"></div>
        <script>(function(d, s, id) {
            var js, fjs = d.getElementsByTagName(s)[0];
            if (d.getElementById(id)) return;
            js = d.createElement(s); js.id = id;
            js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
            fjs.parentNode.insertBefore(js, fjs);
        }(document, 'script', 'facebook-jssdk'));</script>

        <div id="wrap">  
            <div id="header">
                <div class="inside">

                    <a href="HomePage.php"><img id="imgheader"></a>

                </div>
            </div>
            <div id="menu">
                <ul id="nav">
                    <li><a href="HomePage.php" title="Home">Home</a></li>		
                    <li><a href="Campus.php"title="Campus">Campus</a></li>
                    <li><a href="Gallery.php" title="Gallery">Gallery</a></li>
					<?php if ($_SESSION['type'] == 1) { echo '<li><a href="Upload.php" title="Upload">Upload Photo</a></li>'; } ?>
                    <li><a href="#" title="Sponsors">Sponsors</a></li>
                    <li onmouseover="submenushow()" onmouseout="submenuhide()"><a href="LAMB.php" title="Lamb">Lasallian Ambassadors</a>
                        <ul id="submenu">
                            <li><a href="#">Human Reasource Management<br> and Developement </a></li><br>
                            <li><a href="#">Marketing and Publicity</a></li><br>
                            <li><a href="#">Operations and Logistics</a></li><br>
                            <li><a href="#">Research and Documents</a></li><br>
                        </ul>
                    </li>
                    <li><a href="faq.php" title="FAQ" id="faq">FAQ</a></li> 
                </ul>
            </div>
            <div id="content">

                <div class="article">
                    <div class="inside">
                        <?php include("insert.php"); ?>
                        <form name="register" id="register" method="post" >

                            <h2>Register</h2>
                            <?php echo $error_username; ?> 
                            <?php echo $error_password; ?>
                            <?php echo $error_email; ?>
                            <em>Username:</em> <input name="username" id="username" type="text" class="formelement"/><br/><span id="availability_status"></span><br/>
                            <em>Password:</em> <input name="password" id="password" type="password" class="formelement"/><br/><span id="password_status"> </span><br/>
                            <em>Retype Password:</em> <input name="rpass" id="rpass" type="password" class="formelement"/><br/><span id="retype_status"></span><br/>
                            <em>Email:</em> <input name="email" id="email" type="text" class="formelement"/><br/><span id="email_status"></span><br/>
                            <button id="submitReg" action="submit">Submit</button>
                        </form>

                    </div>                   
                </div>


            </div>
            <div id="sidebar">

                <div class="widget" style="padding-bottom: 20px;">

                    <div class="inside">

                        <form style="margin-top:30px;" name="sign" action="LoginUserServlet" method="post" class="logination">
                            <ul>
                                <li>
                                    <h4 style="font-size:12pt;">Login</h4>
                                </li>
                                <li>
                                    <input name="user1" placeholder="Username" id="user1" type="text"/>	
                                </li>
                                <li>
                                    <input name="pass1" placeholder="Password" id="pass1" type="password"/>	
                                </li>
                                <li>
                                    <button type="submit">Log-In</button>
                                </li>


                            </ul>
                        </form>                                    
                    </div>

                </div>
            </div>


            <div class="fb-like-box" data-href="http://www.facebook.com/pages/Lasallian-Ambassadors/226171910194" data-width="200" data-height="240" data-show-faces="true" data-stream="false" data-header="true"></div>


        </div>
    </div>
</body>
</html>
